﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class my_ascx_subscriptions : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int userno = int.Parse(Request["no"]);
        int ctno = int.Parse(Request["cno"]);

        ctpDataContext db=new ctpDataContext();

        var data = from p in db.my_citiport_subscribes
                   join q in db.my_citiport_mines on p.subscribe_ct_no equals q.no
                   join k in db.ct_profiles on q.ct_no equals k.no
                   join l in db.users on q.userno equals l.no
                   where p.userno == userno && q.ct_no == ctno
                   orderby p.addtime descending
                   select new
                   {
                       l.nickname,
                       profile_picture=l.profile_picture.Trim(),
                       tourl="../default.aspx?no="+l.no.ToString()+"&cno="+k.no.ToString()
                       

                   };

        this.DataList2.DataSource = data;
        this.DataBind();

    }
}
